]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
6 years agomessageTray: Make NotificationPolicy properties read-only
Philip Chimento [Tue, 21 Apr 2020 00:25:14 +0000 (17:25 -0700)]
messageTray: Make NotificationPolicy properties read-only

These properties are never written; in the base class they are always
their default values, and in the subclasses the getters are overridden.

This will be necessary because GJS is adding checks to make sure that
readable properties always have a getter, writable properties always
have a setter, and that the variations of camelCase/snake_case are
handled correctly. It's supposedly backwards compatible, but that
assumes that code is not doing things like forgetting a setter on a
writable property. (If the missing setter had ever been called, it might
have led to a crash, which is why we've made this change.)

This is the minimally invasive patch which should work with both older
and newer versions of GJS. If you decide to require GJS 1.65.2, then
you'll also be able to remove the getters from NotificationPolicy as
well.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1205

6 years agoUpdate zh_CN translations
Dingzhong Chen [Sat, 18 Apr 2020 09:10:21 +0000 (09:10 +0000)]
Update zh_CN translations

6 years agoauthPrompt: Fix spinner alignment
Florian Müllner [Mon, 13 Apr 2020 16:55:34 +0000 (18:55 +0200)]
authPrompt: Fix spinner alignment

We want the spinner to be centered with regard to the entry, but
constraining the height breaks that:

 1. clutter_actor_allocate() is called with the available size
 2. clutter_actor_update_constraints() then adjusts that according
    to the constraints
 3. clutter_actor_adjust_allocation() applies the margin/expand/align
    properties.

The issue there is that 2. reduces the allocation to the desired size,
so there is no more extra space to distribute in 3.

We can fix this by either constraining everything (and rely on the
cancel button's alignment) or limit the constraint to the width. The
latter seems more appropriate, given that the constraint is only used
to center the entry horizontally.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2628

6 years agowindowManager: Fix ngettext() call
Florian Müllner [Thu, 16 Apr 2020 22:49:24 +0000 (00:49 +0200)]
windowManager: Fix ngettext() call

We don't pass the number that allows gettext to decide on the
correct string, whoops.

Spotted by Alexandre Franke.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2649

6 years agopolkitAgent: Reset the session request timeout when removing it
Marco Trevisan (Treviño) [Fri, 17 Apr 2020 15:54:52 +0000 (17:54 +0200)]
polkitAgent: Reset the session request timeout when removing it

When handing the resetDialog request we're leaving a source ID alive,
leading this error:

(gnome-shell:22464): GLib-CRITICAL **: 17:46:11.065: Source ID 12934 was not
found when attempting to remove it:

== Stack trace for context 0x55c9246916c0 ==
#0 55c9249151b8 i   js/ui/components/polkitAgent.js:391 (11f71fd544c0 @ 100)
#1 7ffc55140aa0 b   self-hosted:1009 (3062ba49af88 @ 423)
#2 55c924915120 i   js/ui/modalDialog.js:167 (1c9e50ae9880 @ 62)
#3 55c924915098 i   js/ui/modalDialog.js:186 (1c9e50ae9970 @ 12)
#4 55c924915008 i   js/ui/environment.js:75 (1c9e50a8d5b0 @ 98)
#5 55c924914f78 i   js/ui/environment.js:149 (1c9e50a8d9e8 @ 14)

So, reset the source handle to avoid trying to remove it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1203

6 years agopolkitAgent: Return GLib.SOURCE_REMOVE on timeout callback
Marco Trevisan (Treviño) [Fri, 17 Apr 2020 15:51:27 +0000 (17:51 +0200)]
polkitAgent: Return GLib.SOURCE_REMOVE on timeout callback

resetDialog is used (also) as GLib timeout function, so while just returning
an undefined value will stop the timeout anyways, it's just cleaner to
use the GSource expected return values

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1203

6 years agojs/ui: Always use namespace for animation modes
Jonas Ådahl [Wed, 15 Apr 2020 09:16:32 +0000 (11:16 +0200)]
js/ui: Always use namespace for animation modes

Clutter.Animation doesn't contain any animation modes, they live in
Clutter.AnimationMode. The places we did `Clutter.Animation.WHATEVER`
just evaluated to `undefined`. Thus, use the correct namespace for the
animation mode enums.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1199

6 years agojs: Drop tweener.js
Jonas Ådahl [Wed, 15 Apr 2020 09:24:10 +0000 (11:24 +0200)]
js: Drop tweener.js

We're using clutter's animation framework now, so lets drop the old
tweener support layer.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1200

6 years agobuild: Obtain systemduserunitdir from pkg-config
Jan Tojnar [Fri, 10 Apr 2020 11:43:25 +0000 (13:43 +0200)]
build: Obtain systemduserunitdir from pkg-config

Previously, this prevented local installation because systemd did not
make the variable's prefix overridable

https://github.com/systemd/systemd/issues/9595

but since it has been fixed in systemd 242, we can finally use that.

---

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194

6 years agobuild: Install keybindings relative to our datadír
Jan Tojnar [Thu, 9 Apr 2020 20:25:32 +0000 (22:25 +0200)]
build: Install keybindings relative to our datadír

It is a good practice to install files relative to our own variables

https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

and it is required on systems like NixOS.

---

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194

6 years agoextension-tool/build: Install completions relative to our datadír
Jan Tojnar [Thu, 9 Apr 2020 18:38:02 +0000 (20:38 +0200)]
extension-tool/build: Install completions relative to our datadír

It is a good practice to install files relative to our own variables

https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

and it is required on systems like NixOS.

Thanks to Iñigo, bash-completion support that since 2.10:

https://github.com/scop/bash-completion/pull/344

---

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194

6 years agoUpdate Finnish translation
Jiri Grönroos [Mon, 13 Apr 2020 15:03:18 +0000 (15:03 +0000)]
Update Finnish translation

(cherry picked from commit cc0fac895c7f0bd0c2bf2c7f6af483de390c1730)

6 years agoappDisplay: Look up directory- instead of category translations
Florian Müllner [Sun, 12 Apr 2020 15:15:48 +0000 (17:15 +0200)]
appDisplay: Look up directory- instead of category translations

Translations are provided by .directory files, so trying to look
up a category name without the suffix will always fail.

Commit 343b3351f1 tried to fix this previously by changing the
saved keys, but that broke existing translatable folders.

Appending the .directory suffix for the lookup instead fixes the
issue without regressing non-custom folders.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2623

6 years agoRevert "app-cache: Fix cache for folder translations"
Florian Müllner [Mon, 13 Apr 2020 13:41:54 +0000 (15:41 +0200)]
Revert "app-cache: Fix cache for folder translations"

Existing folders as created by gnome-software (including the
default ones) all have the .directory suffix, so dropping
the suffix from the keys broke those folders.

This reverts commit 343b3351f172e112e1a70b54956ab3444140fbf4.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2623

6 years agoUpdate Esperanto translation
Carmen Bianca BAKKER [Sat, 11 Apr 2020 18:21:21 +0000 (18:21 +0000)]
Update Esperanto translation

6 years agodateMenu: Update empty weather label
Mariana Picolo [Sun, 5 Apr 2020 07:39:02 +0000 (04:39 -0300)]
dateMenu: Update empty weather label

Remove subtitle for the empty weather state
to match world clocks button.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2179

6 years agoappDisplay: Reorganize AppDisplay actor hierarchy
Georges Basile Stavracas Neto [Wed, 11 Dec 2019 18:07:16 +0000 (15:07 -0300)]
appDisplay: Reorganize AppDisplay actor hierarchy

Right now, the actor hierarchy is such that the scroll view
does not contain the actual grid. It looks as follows:

              StScrollView
                    ↓
               StBoxLayout
                    ↓
                ShellStack
                ↓        ↓
   PaginatedIconGrid     StWidget

This hierarchy can be slightly reorganized by changing it to be as
follows:

            ShellStack
             ↓     ↓
   StScrollView   StWidget
        ↓
   StBoxLayout
        ↓
 PaginatedIconGrid

This will simplify future work where the PaginatedIconGrid will be
an implementation of StScrollable, in which case we'll be able to
simply remove the StBoxLayout from there.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1191

6 years agost/entry: Allow hint actor to shrink
Florian Müllner [Wed, 8 Apr 2020 22:05:20 +0000 (00:05 +0200)]
st/entry: Allow hint actor to shrink

We currently always ignore the minimum width of the hint actor and
request/allocate the preferred width. This can be problematic with
labels with long text, where we should rather ellipsize the text
than allow the entry to grow indefinively.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2607

6 years agobuild: Bump version requirement
Florian Müllner [Thu, 5 Mar 2020 14:35:48 +0000 (15:35 +0100)]
build: Bump version requirement

We are currently optionally using a 0.53 feature, bump the requirement
to make it non-optional.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1186

6 years agoextensions-tool: Add small indicator template
Florian Müllner [Wed, 6 Nov 2019 09:44:28 +0000 (10:44 +0100)]
extensions-tool: Add small indicator template

Adding an additional icon to the top bar is one of the more common
patterns used by extensions. Make this easier by providing a template
for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Prompt for template when appropriate
Florian Müllner [Thu, 7 Nov 2019 14:16:34 +0000 (15:16 +0100)]
extensions-tool: Prompt for template when appropriate

When creating an extension interactively, we currently always use
the default template unless the --template option is used.

Instead, display the list of available templates to the user and
prompt them to pick one if it wasn't specified.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Add --template create option
Florian Müllner [Thu, 7 Nov 2019 11:46:47 +0000 (12:46 +0100)]
extensions-tool: Add --template create option

We now have everything in place to allow users to pick a template
other than the default one (although at the moment it's the only
one we have), so add a corresponding option.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Add hidden --list-templates option
Florian Müllner [Thu, 7 Nov 2019 14:36:35 +0000 (15:36 +0100)]
extensions-tool: Add hidden --list-templates option

This isn't a very useful option on its own, but will be used to
provide completions for a user-visible --template option.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Add template metadata
Florian Müllner [Fri, 8 Nov 2019 23:20:08 +0000 (00:20 +0100)]
extensions-tool: Add template metadata

When we allow users to choose between different templates, we should
provide some context for each template to facilitate that choice.

Add that metadata in the form of a .desktop file, which allows us to
specify name and description, and is well supported by our translation
infrastructure.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Prepare for alternative templates
Florian Müllner [Wed, 6 Nov 2019 09:06:11 +0000 (10:06 +0100)]
extensions-tool: Prepare for alternative templates

The template used when creating a new extension is intentionally
minimal, as the sample code in the old extensions-tool proved to
be annoying more often than not.

However as we support per-command options, we don't have to limit
ourselves to a single template, and can offer alternatives for
common use cases.

To prepare for that, namespace the existing template by moving it
into a subfolder.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Separate create metadata when prompting
Florian Müllner [Sun, 10 Nov 2019 02:00:37 +0000 (03:00 +0100)]
extensions-tool: Separate create metadata when prompting

When using the create command's --interactive option, we prompt for
any metadata that wasn't passed on the command line. As every prompt
is preceded by a short multi-line description, it is hard to follow
when everything is lumped together.

Improve legibility by separating all prompts by newlines.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Handle NULL input when prompting for metadata
Florian Müllner [Mon, 6 Apr 2020 23:49:30 +0000 (01:49 +0200)]
extensions-tool: Handle NULL input when prompting for metadata

g_data_input_stream_read_line_utf8() may return NULL, for example
when interrupting the prompt with ^D. Handle that case and keep
prompting until we got a line.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoci: Handle POTFILES.skip in potfiles check
Florian Müllner [Tue, 10 Mar 2020 00:39:09 +0000 (01:39 +0100)]
ci: Handle POTFILES.skip in potfiles check

Allow marking files as ignored when searching for translatable
strings, similar to "good" ol' intltool.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoappFavorites: Hide favourites which are blacklisted by parental controls
Philip Withnall [Tue, 31 Mar 2020 09:33:18 +0000 (10:33 +0100)]
appFavorites: Hide favourites which are blacklisted by parental controls

If a favourite is set for an app which is blocked by parental controls,
that favourite should be hidden.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agosearch: Hide search providers which are blacklisted by parental controls
Philip Withnall [Mon, 30 Mar 2020 11:40:11 +0000 (12:40 +0100)]
search: Hide search providers which are blacklisted by parental controls

If a search provider is installed by an app which is blacklisted for the
current user by their parental controls, don’t show it or results for
it.

Currently, this only filters ‘remote’ (not built-in to the shell) search
providers. This seems fine for now; in future it could be expanded to
also filter built-in search providers, if any of them end up needing to
be filtered.

No corresponding changes need to be made `remoteSearch.js`, because the
results of `loadRemoteSearchProviders()` are filtered in `search.js`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agojs: Add support for parental controls filtering to the desktop
Philip Withnall [Wed, 24 Apr 2019 09:37:10 +0000 (10:37 +0100)]
js: Add support for parental controls filtering to the desktop

Filter the apps shown on the desktop and in search results according to
whether they are blacklisted by the user’s parental controls.

This supports dynamically updating the filter during the user’s session.

This adds an optional dependency on libmalcontent. If that’s unavailable, no
parental controls filtering will occur.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agoutil: Add a wrapper around getuid()
Philip Withnall [Thu, 22 Nov 2018 15:03:04 +0000 (15:03 +0000)]
util: Add a wrapper around getuid()

So we can use it from JS in an upcoming commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agobuild: Bump gjs requirement
Florian Müllner [Fri, 3 Apr 2020 02:04:34 +0000 (04:04 +0200)]
build: Bump gjs requirement

We require gjs!410 for commit 764527. There has been a gjs release
with that change now, so bump the requirement accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2559

6 years agoci: Update to F32-based image
Florian Müllner [Fri, 3 Apr 2020 22:58:47 +0000 (00:58 +0200)]
ci: Update to F32-based image

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2559

6 years agobluetooth: Do not update hadSetupDevices on adapter changes
Florian Müllner [Fri, 3 Apr 2020 18:44:41 +0000 (20:44 +0200)]
bluetooth: Do not update hadSetupDevices on adapter changes

While we now deal more gracefully with adapter removals, we can
still mess up the hadSetupDevices tracking:

As adapters become available before any devices, we'll always
reset the setting to false when Bluetooth is turned on. And if
no set up device happens to be in range, it will still be false
when Bluetooth is turned off again.

To address that, only update the setting if we have an adapter
(like we do now) and we had one before (so it wasn't the adapter
itself that changed).

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1174

6 years agobluetooth: Do not sync() immediately on model changes
Florian Müllner [Fri, 3 Apr 2020 18:27:34 +0000 (20:27 +0200)]
bluetooth: Do not sync() immediately on model changes

Our intended behavior when bluetooth is turned off is to keep
the menu visible if devices had been set up previously.

However since gnome-bluetooth@c437c729, devices are removed
first before removing the default adapter, so we now end up
always setting the property to false before checking for it.

Fix this by deferring all model changes to an idle, so that
we can process them as a unit. Do the same for proxy property
changes, as those may trigger a row-removal.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1174

6 years agobluetooth: Fix showing menu when devices were set up
Florian Müllner [Fri, 3 Apr 2020 12:34:21 +0000 (14:34 +0200)]
bluetooth: Fix showing menu when devices were set up

Since commit 26c2cb9f65c, nDevices is always the actual number of
paired/trusted devices. So when bluetooth is turned off, it is
now 0 rather than forced to 1 if devices were set up previously.

Fix this by checking the property that tracks set up devices instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1174

6 years agoshell-app: Ignore invalid window PIDs
Jonas Dreßler [Mon, 6 Apr 2020 18:31:46 +0000 (20:31 +0200)]
shell-app: Ignore invalid window PIDs

When building the list of window PIDs, it's possible Mutter doesn't know
about the PID the client has and meta_window_get_pid() will return 0. We
should handle this case by not adding the PID to the list of PIDs
instead of adding an invalid one to it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1184

6 years agoshell-window-tracker: Detect invalid PID values of 0
Jonas Dreßler [Mon, 6 Apr 2020 18:28:00 +0000 (20:28 +0200)]
shell-window-tracker: Detect invalid PID values of 0

MetaWindows get_pid() API changed to use the client PID, which also
works for Wayland clients instead of only X11 clients now. This API
returns 0 instead of -1 for invalid PIDs, so update our check according
to that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1184

6 years agotheme: tone down weekend with events
Jakub Steiner [Mon, 6 Apr 2020 15:43:51 +0000 (17:43 +0200)]
theme: tone down weekend with events

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2588

6 years agoUpdate Ukrainian translation
Yuri Chornoivan [Mon, 6 Apr 2020 16:19:08 +0000 (16:19 +0000)]
Update Ukrainian translation

6 years agoanimation: Set size through CSS
Georges Basile Stavracas Neto [Mon, 6 Apr 2020 14:19:28 +0000 (11:19 -0300)]
animation: Set size through CSS

Pretty much the same case of the previous commit: we want this size
to be scale-dependant, and using the width and height properties of
ClutterActor doesn't automatically update.

Use CSS to set the width and height.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agoappDisplay: Set the folder icon geometry through CSS
Georges Basile Stavracas Neto [Fri, 3 Apr 2020 21:09:09 +0000 (18:09 -0300)]
appDisplay: Set the folder icon geometry through CSS

The CSS engine is scale-aware, whereas simply setting the
width and height properties directly isn't.

Use CSS to set the folder icon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-node: Use the node's scale factor
Georges Basile Stavracas Neto [Fri, 3 Apr 2020 21:04:13 +0000 (18:04 -0300)]
st/theme-node: Use the node's scale factor

Each node stores the scale factor in place when it was created.
Creating nodes with the same style, but with different scale
factors, yields different nodes.

Use the node's scale factor instead of retrieving the context's
one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-node: Consider scale factor when comparing
Georges Basile Stavracas Neto [Fri, 3 Apr 2020 20:44:54 +0000 (17:44 -0300)]
st/theme-node: Consider scale factor when comparing

The CSS engine of St is scale-aware, which means every length
and size it produces is multiplied by the current scale factor.

However, the individual nodes aren't aware of the scale factor
when they compare to each other.

Store and compare the scale factors in the nodes themselves.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1635

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-context: Add a getter for the scale-factor property
Georges Basile Stavracas Neto [Mon, 6 Apr 2020 14:15:38 +0000 (11:15 -0300)]
st/theme-context: Add a getter for the scale-factor property

Will be used by the next commit to avoid going through the GObject
machinery when retrieving the scale factor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-context: Also invalidate root node on stylesheet changes
Jonas Dreßler [Mon, 6 Apr 2020 00:11:27 +0000 (02:11 +0200)]
st/theme-context: Also invalidate root node on stylesheet changes

Since commit 6a42d7726119c538d260e54cdbe2f31e5fbeb03c we invalidate the
cached properties for each theme node on stylesheet changes by iterating
over the hashtable of the theme context instead of listening to the
signal in each individual theme node.

That commit forgot one particular node though that's not stored in the
hashtable, but using the `priv->root_node` property instead: The theme
node that belongs to the stage.

So make sure we also invalidate the cached properties of the stage theme
node on stylesheet changes. This fixes various crashes that happened
with extensions providing custom stylesheets (emitting the
"custom-stylesheets-changed" signal on every extension enable/disable),
trying to access an already freed CSS property of the stage.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2584
6 years agoshell-app: Use container widget for fallback X11 app icons
Jonas Dreßler [Sun, 5 Apr 2020 18:38:21 +0000 (20:38 +0200)]
shell-app: Use container widget for fallback X11 app icons

Just like StIcon does, we should use a container widget for the fallback
app icon that we get using the cairo surface property. It's needed
because the widget returned by shell_app_create_icon_texture() can be
resized freely, while we want the aspect ratio of the actual texture to
remain the same.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2578
6 years agodata: Add extension-portal desktop file
Florian Müllner [Thu, 2 Apr 2020 14:53:40 +0000 (16:53 +0200)]
data: Add extension-portal desktop file

Now that the extension preference dialog is opened by a separate
D-Bus service rather than the Extensions app, it can be opened
without a parent window that provides name and icon.

Fix this by adding back a hidden .desktop file.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2562

6 years agoextension-tool: Use enable/disable D-Bus API if possible
Florian Müllner [Tue, 23 Jul 2019 23:37:09 +0000 (23:37 +0000)]
extension-tool: Use enable/disable D-Bus API if possible

Commit 4589da957 added D-Bus API for enabling/disabling extensions,
use that if possible to provide better feedback and not clutter the
settings with non-existent UUIDs.

The old code path is preserved as fallback to keep the commands
working from outside a running shell session.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool/uninstall: Error out for system extensions
Florian Müllner [Sat, 14 Mar 2020 10:38:38 +0000 (11:38 +0100)]
extensions-tool/uninstall: Error out for system extensions

UninstallExtensions() only returns whether the operation was successful,
not why it failed. However we know that only user extensions can be
uninstalled, so check that first to provide a more meaningful error.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool: Split out get_extension_property() helper
Florian Müllner [Sat, 14 Mar 2020 10:38:24 +0000 (11:38 +0100)]
extensions-tool: Split out get_extension_property() helper

For the prefs command, we first fetch the extension info to check
whether the extension exists and actually has preferences. This
pattern can be useful for other commands and properties, so split
out a generic helper function.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool: Log existing errors
Florian Müllner [Sat, 14 Mar 2020 10:00:49 +0000 (11:00 +0100)]
extensions-tool: Log existing errors

In many cases we currently only indicate failure in the return value,
which is easily missed. Print some meaningful errors instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool: Add common option to silence errors
Florian Müllner [Sat, 14 Mar 2020 11:58:04 +0000 (12:58 +0100)]
extensions-tool: Add common option to silence errors

Error reporting is useful when used interactively, but often undesirable
when used in scripts. Account for that with a common --quiet option,
which is more convenient than redirection stderr to /dev/null.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-app: Validate .desktop file during meson test
Florian Müllner [Wed, 1 Apr 2020 04:18:05 +0000 (06:18 +0200)]
extensions-app: Validate .desktop file during meson test

... if desktop-file-validate is available.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160

6 years agoextensions-app: Add category in .desktop file
Florian Müllner [Tue, 31 Mar 2020 22:09:38 +0000 (00:09 +0200)]
extensions-app: Add category in .desktop file

Predefined categories aren't a great way for organizing installed
applications, but they have their use in "stores" like Software
or flathub.

Not listing any category means we fall through the cracks, so
pick the (hopefully) least inappropriate one ...

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160

6 years agoextensions-app: Add developer name in metainfo
Florian Müllner [Tue, 31 Mar 2020 22:08:48 +0000 (00:08 +0200)]
extensions-app: Add developer name in metainfo

Unlike Software, flathub doesn't fall back to the "project group"
when no developer is specified, so add one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160

6 years agoextensions-app: Add flathub badge to README
Florian Müllner [Tue, 31 Mar 2020 21:58:45 +0000 (23:58 +0200)]
extensions-app: Add flathub badge to README

The app is now on flathub, so brag about that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160

6 years agoUpdate Latvian translation
Rūdolfs Mazurs [Sat, 4 Apr 2020 16:14:40 +0000 (16:14 +0000)]
Update Latvian translation

(cherry picked from commit 6d38a4a7b33ee02d4a4a59957e6fbe74acd21c3a)

6 years agost/icon: Always show empty texture if both gicons are NULL
Jonas Dreßler [Sat, 4 Apr 2020 08:12:06 +0000 (10:12 +0200)]
st/icon: Always show empty texture if both gicons are NULL

Commit 7ff7fb5d3b3ee655b1492226f68aeadac846e247 forgot to clear the
`priv->icon_texture` actor when returning from st_icon_update(), which
means we don't always switch to an empty icon if both gicon properties
are set to NULL.

Fix this and destroy the actor before returning early from
st_icon_update().

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1178

6 years agost/icon: Use a static GIcon for the missing-image icon
Jonas Dreßler [Sat, 4 Apr 2020 11:11:37 +0000 (13:11 +0200)]
st/icon: Use a static GIcon for the missing-image icon

Don't create a new GIcon for the "missing-image" texture but simply
create it once statically instead and always use that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1179

6 years agoiconGrid: Downscale icon size when comparing to defaults
Georges Basile Stavracas Neto [Fri, 3 Apr 2020 18:28:57 +0000 (15:28 -0300)]
iconGrid: Downscale icon size when comparing to defaults

The return value of st_theme_node_lookup_length() is scaled according
to the scale factor. IconGrid.ICON_SIZE is not. However, when BaseIcon
tries to fetch the CSS value for "icon-size" (which returns a scaled
value), it uses it as-is, mixing the two coordinate systems.

Use a single coordinate system (unscaled sizes) in IconGrid.BaseIcon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1175

6 years agoscreenShield: Wake up on deactivate()
Florian Müllner [Tue, 31 Mar 2020 19:07:59 +0000 (21:07 +0200)]
screenShield: Wake up on deactivate()

Usually the screen is woken up before the shield is deactivated, but
it is also possible to unlock the session programmatically via the
org.gnome.ScreenSaver D-Bus API.

The intention is very likely not to unlock a turned off screen in
that case. Nor does it seem like a good idea to change the lock
state without any indication.

Waking up the screen is more likely to meet expectations and is
more reasonable too, so do that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1158

6 years agoscreenShield: Switch lightboxes off before unlock transition
Florian Müllner [Wed, 1 Apr 2020 12:48:10 +0000 (14:48 +0200)]
screenShield: Switch lightboxes off before unlock transition

There is no point in animating a transition with fullscreen black
rectangles stacked on top, so switch them off before rather than
after the transition.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1158

6 years agost/icon: Only load default fallback icon if an icon was set and failed to load
Andre Moreira Magalhaes [Fri, 3 Apr 2020 13:25:25 +0000 (10:25 -0300)]
st/icon: Only load default fallback icon if an icon was set and failed to load

Commit c89d6a633 introduced a default fallback icon that would be displayed in
case the main gicon or the fallback gicon wasn't set or failed to load.

This broke the use case where a StIcon is created but no main icon or
fallback icon are set on purpose, for example the appindicator extension
which always creates a StIcon to represent icons in menu items but the
actual icons are only set if the application provides one, leaving the
menu showing the default fallback ("image-missing") icon for all menu
entries that don't actually have an icon provided by the application.

Fix that by only using the default fallback icon if the provided one
failed to load.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1173

6 years agoextensionUtils: Add openPrefs() convenience method
Florian Müllner [Wed, 1 Apr 2020 19:08:38 +0000 (21:08 +0200)]
extensionUtils: Add openPrefs() convenience method

Opening their own preferences is a reasonable desire for extensions,
so make up for breaking it by adding a convenience method for that
action.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1163

6 years agoextensionSystem: Add method for opening extension prefs
Florian Müllner [Wed, 1 Apr 2020 19:04:03 +0000 (21:04 +0200)]
extensionSystem: Add method for opening extension prefs

Extension that want to expose their own preferences (for example as menu
items) do that by passing their UUID to gnome-shell-extension-prefs.

But since 3.36.1 the app is optional and no longer accepts arguments on
the command line. To adjust, extensions now need to make a D-Bus call
the extensions portal, just like the app and gnome-shell.

We will add a convenience method for that purpose, so it makes
sense to share the existing code. As it's extension-related, the
extension manager looks like the right place ...

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1163

6 years agoworkspace: Fix chaining up
Florian Müllner [Fri, 3 Apr 2020 12:43:16 +0000 (14:43 +0200)]
workspace: Fix chaining up

Gah, accidentally dropped the 'vfunc' prefix :-(

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1172

6 years agoextensions-app: Do not expand headerbar switch
Florian Müllner [Thu, 2 Apr 2020 15:19:55 +0000 (17:19 +0200)]
extensions-app: Do not expand headerbar switch

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2563

6 years agojs: Account for promisified call() method
Florian Müllner [Thu, 19 Dec 2019 19:50:37 +0000 (20:50 +0100)]
js: Account for promisified call() method

A promisified method expects the callback parameter to be either
a function (in which case the original method is called normally)
or omitted altogether (in which case a Promise is returned).

The call to open application details in Software does neither and
passes null instead, which will result in a warning (because no
function argument means a promise will be used, but not omitting
the parameter means we end up with too many arguments).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2551

6 years agoappDisplay: Don't clear signal handler id before emitting
Jonas Ådahl [Thu, 2 Apr 2020 17:47:52 +0000 (19:47 +0200)]
appDisplay: Don't clear signal handler id before emitting

Otherwise we won't clear the 'view-loaded' handler after it was emitted.

Also move field initialization to the correct place, i.e. the init
function of the base class.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1169

6 years agoapp-cache: Fix cache for folder translations
Andre Moreira Magalhaes [Thu, 2 Apr 2020 16:20:16 +0000 (13:20 -0300)]
app-cache: Fix cache for folder translations

The app-cache code currently stores the folder translations in a hash
that can be accessed via shell_util_get_translated_folder_name().
This hash uses the filename (inc. extension) for the "desktop-directory"
as key which causes an issue when trying to find the translation
on AppDisplay._findBestFolderName() which gets categories (folder names)
from the app info which doesn't contain the ".directory" extension.

Fix that by storing the filename without extension as the hash key for
the cached folder translations.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1168

6 years agoUpdate Serbian translation
Марко Костић [Thu, 2 Apr 2020 19:43:03 +0000 (19:43 +0000)]
Update Serbian translation

(cherry picked from commit 428d38179d54aeaa89bf35f4ce475d48c8ff2467)

6 years agoUpdate Basque translation
Ibai Oihanguren Sala [Thu, 2 Apr 2020 16:15:32 +0000 (16:15 +0000)]
Update Basque translation

(cherry picked from commit fe9708ebd85b0c08562ad079fb41ece31ccdf152)

6 years agobluetooth: Fix infinite loop
Florian Müllner [Thu, 2 Apr 2020 10:42:41 +0000 (12:42 +0200)]
bluetooth: Fix infinite loop

Bailing out early of the loop means the iter is never increased,
resulting in an infinite loop.

Fixes 26c2cb9f6.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1165

6 years agoUpdate Finnish translation
Jiri Grönroos [Thu, 2 Apr 2020 09:44:36 +0000 (09:44 +0000)]
Update Finnish translation

(cherry picked from commit 8398769321d0fa21f31f42a2a65490fdedd55bf3)

6 years agobluetooth: Update bluetooth submenu title
Mariana Picolo [Sat, 28 Mar 2020 18:56:20 +0000 (15:56 -0300)]
bluetooth: Update bluetooth submenu title

- "Bluetooth" to "on/off" labels
  to match with other menus

- Display single connected device name
  to show more relevant information

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2340

6 years agobluetooth: Add getDeviceInfos function
Mariana Picolo [Mon, 30 Mar 2020 08:48:06 +0000 (05:48 -0300)]
bluetooth: Add getDeviceInfos function

In case where only one device is connected, we want to display its name
in the menu. For that we will need more than the number of known/connected
devices, so change the function to return an array of device infos instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2340

6 years agoUpdate Persian translation
Danial Behzadi [Wed, 1 Apr 2020 01:42:46 +0000 (01:42 +0000)]
Update Persian translation

(cherry picked from commit 69426cbfdacca6450c1450745a6ba5b844789e9b)

6 years agomain: Don't override DesktopAppInfo desktop if already GNOME
Marco Trevisan (Treviño) [Tue, 31 Mar 2020 18:13:46 +0000 (20:13 +0200)]
main: Don't override DesktopAppInfo desktop if already GNOME

During the shell initialization we call the (deprecated) function to
override the Desktop environment in Gio DesktopAppInfo to make sure that
applications are correctly shown (as per commit b2fbf5a2), however this
might break the cases in which $XDG_CURRENT_DESKTOP is already set and
contains GNOME (given that is now a list).

In Ubuntu this is in fact set to: ubuntu:GNOME.
Now, if an application contains NotShowIn=ubuntu, the key will be ignored by
the shell, and the application is still listed everywhere.

So, override the DesktopAppInfo desktop environment only in the case that
the current desktop is not already GNOME.

At the current date I think we could just safely get rid of this override at
all, but there could be still cases where it still might be useful, like when
running as nested in some other environment, so keeping it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1156

6 years agoappDisplay: Clear animateLater callbacks when unmapping
Jonas Ådahl [Tue, 31 Mar 2020 17:00:58 +0000 (19:00 +0200)]
appDisplay: Clear animateLater callbacks when unmapping

In some situations we could end up not with lingering 'view-loaded'
handler. This could result in delayed spring animate-in being initiated,
e.g. after a minute after the activities overview was already closed.

Fix this by removing any lingering signal or later handlers when
unmapping.

Fixes: 5c33fe4a0a4eb4ed
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1155

6 years agoUpdate Chinese (Taiwan) translation
Cheng-Chia Tseng [Tue, 31 Mar 2020 16:07:19 +0000 (16:07 +0000)]
Update Chinese (Taiwan) translation

(cherry picked from commit 1ab5e6973a9c16401947d350b3159e2c955e62b2)

6 years agoUpdate Friulian translation
Fabio Tomat [Tue, 31 Mar 2020 11:14:15 +0000 (11:14 +0000)]
Update Friulian translation

(cherry picked from commit 1dea3341ecdb261005a209eb9b99b1c2a6b9e52e)

6 years agojs: Promisify async operations
Florian Müllner [Thu, 19 Dec 2019 19:50:37 +0000 (20:50 +0100)]
js: Promisify async operations

Promises make asynchronous operations easier to manage, in particular
when used through the async/await syntax that allows for asynchronous
code to closely resemble synchronous one.

gjs has included a Gio._promisify() helper for a while now, which
monkey-patches methods that follow GIO's async pattern to return a
Promise when called without a callback argument.

Use that to get rid of all those GAsyncReadyCallbacks!

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1126

6 years agobuild: Post-release version bump
Florian Müllner [Mon, 30 Mar 2020 22:36:48 +0000 (00:36 +0200)]
build: Post-release version bump

With 3.36.1 out, let's start the next development cycle ...

6 years agoappDisplay: Don't start animation from the 'paint' signal
Jonas Ådahl [Mon, 30 Mar 2020 13:16:53 +0000 (15:16 +0200)]
appDisplay: Don't start animation from the 'paint' signal

Starting the animation from the actor 'paint' signal has various
unwanted consequences, such as sometimes trigger a
clutter_actor_queue_relayout() during the paint phase. One unwanted
consequence was that an offscreen actor effect was disabled during
painting, meaning the effect would begin being active, but later during
the post-paint processing being disabled. The caused said effect to push
an offscreen framebuffer to the paint context, but then just destroy it
instead of popping it. When this happened, we'd end up trying to operate
on a framebuffer that may had been finalized, or not, depending on the
garbage collector. Sometimes, for some users, this caused a segmentation
fault when trying to pop a matrix from the framebuffer matrix stack.

Deal with this more properly, by using the 'view-loaded' signal to wait
with animation until the view is loaded, as well as using MetaLater to
schedule the start of the animation.

For when a view was signalled to be ready, we're in a state where we can
start animation before the next frame as the layout is ready, but when
not, we have to add back the "hack" where we must wait for one frame for
the target icon positions to be up to date. Do this by adding a
MetaLater IDLE callback that starts the animation *after* the next
frame. This also needs the old 'opacity = 0' work around to not show an
incorrect first frame.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2418
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1154

6 years agojs: Do not set entries' ClutterText:editable property
Florian Müllner [Wed, 18 Mar 2020 21:20:33 +0000 (22:20 +0100)]
js: Do not set entries' ClutterText:editable property

The property influences the text's (and thus entry's) minimum width[0],
which is generally not what we want. And as we now prevent text from
being entered in non-reactive entries by other means, we can simply
drop it.

[0] https://gitlab.gnome.org/GNOME/mutter/-/blob/master/clutter/clutter/clutter-text.c#L2940

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423

6 years agost/entry: Unset key focus when made unreactive
Florian Müllner [Sun, 29 Mar 2020 17:36:12 +0000 (19:36 +0200)]
st/entry: Unset key focus when made unreactive

It seems reasonable that an entry shouldn't allow entering text when not
reactive. The same could be achieved by changing the text's :editable
property, however that will disable scrolling if the text doesn't fit,
which may result in an unwanted size change.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423

6 years agost/entry: Bind ClutterText reactivity to entry
Florian Müllner [Wed, 18 Mar 2020 21:10:36 +0000 (22:10 +0100)]
st/entry: Bind ClutterText reactivity to entry

The text is part of the entry, so it is surprising that it can
still be edited when the entry itself isn't reactive. Address
this by setting up a binding instead of expecting all consumers
to handle the case themselves.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423

6 years agost/entry: Remove unused macro
Florian Müllner [Sun, 29 Mar 2020 20:11:35 +0000 (22:11 +0200)]
st/entry: Remove unused macro

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423

6 years agoUpdated Lithuanian translation
Aurimas Černius [Sun, 29 Mar 2020 19:28:04 +0000 (22:28 +0300)]
Updated Lithuanian translation

6 years agoextensions-app: Point homepage in metainfo to subproject
Florian Müllner [Sun, 29 Mar 2020 00:41:57 +0000 (01:41 +0100)]
extensions-app: Point homepage in metainfo to subproject

This is where the app code is located now, so it makes for a less
surprising landing page than the toplevel gnome-shell directory.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1150

6 years agoextensions-app: Update README
Florian Müllner [Sun, 29 Mar 2020 00:35:55 +0000 (01:35 +0100)]
extensions-app: Update README

Add the icon and use the app name instead of the subproject name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1150

6 years agocheckbox: Improve accessibility of check boxes for Orca users
Luke Yelavich [Sun, 29 Mar 2020 01:42:44 +0000 (12:42 +1100)]
checkbox: Improve accessibility of check boxes for Orca users

Set the label actor, so Orca presents the label text when the check box
has focus. Also change the role to ATK_ROLE_CHECKBOX.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2517

6 years agoUpdate Hebrew translation
Yosef Or Boczko [Sun, 29 Mar 2020 07:45:59 +0000 (07:45 +0000)]
Update Hebrew translation

6 years agocalendar: Improve the accessibility of the "Do Not Disturb" switch
Luke Yelavich [Sat, 28 Mar 2020 03:56:23 +0000 (14:56 +1100)]
calendar: Improve the accessibility of the "Do Not Disturb" switch

Set the do not disturb label as the label actor for the do not disturb switch,
so that Orca speaks the do not disturb label when the user moves
keyboard focus to the do not disturb switch.

Also enable toggle mode for the "Do Not Disturb" button and bind it's checked
state to the state property of the switch. This makes sure that Orca presents
thecorrect state of the do not disturb switch to the user.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2508

6 years agoUpdate Hebrew translation
Yosef Or Boczko [Sat, 28 Mar 2020 23:10:11 +0000 (23:10 +0000)]
Update Hebrew translation

6 years agoshellDBus: Return error from ReloadExtension
Florian Müllner [Sat, 28 Mar 2020 17:55:17 +0000 (18:55 +0100)]
shellDBus: Return error from ReloadExtension

The method has been deprecated because it generally doesn't (and
can't) work. Clarify that by returning an error instead of
apparently doing nothing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2510

6 years agokeyboard: Hide keyboardBox after destroying the keyboard
Jonas Dreßler [Sat, 28 Mar 2020 13:36:20 +0000 (14:36 +0100)]
keyboard: Hide keyboardBox after destroying the keyboard

It seems there is a weird race condition between Clutter trying to
destroy the keyboard actor and Clutter trying to hide the keyboardBox
container actor: If the keyboardBox is hidden before destroying the
keyboard actor, Clutter doesn't repaint anything and the keyboard
remains visible until something else draws over it.

To fix this issue until we find the underlying Clutter bug, simply
destroy the keyboard actor before hiding the keyboardBox. The order in
which we call these doesn't matter anyway since hideKeyboard(true) hides
the keyboard immediately without an animation.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1736
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142

6 years agolayout: Use translation_y of 0 to hide keyboard
Jonas Dreßler [Sat, 28 Mar 2020 13:34:24 +0000 (14:34 +0100)]
layout: Use translation_y of 0 to hide keyboard

Since we show the keyboard using a translation_y of -keyboardHeight, the
keyboard will be moved down far enough to be out of sight by setting
translation_y to 0.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142